package com.example.javaweb1.controller;

import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class FilterConfig {
    @Bean
    public FilterRegistrationBean<loginFilter> loggingFilter(){
        FilterRegistrationBean<loginFilter> registrationBean
                = new FilterRegistrationBean<>();

        registrationBean.setFilter(new loginFilter());
        registrationBean.addUrlPatterns("/uplode/*");

        return registrationBean;
    }
}
